  <% content_for :title do %>
    <%=h @genre.name %>
  <% end %>

  <% content_for :edit do %>
    <%= link_to 'Delete Entry?', 
                new_delete_request_path(:editable_id => @genre.id, 
                                        :editable_type => "Genre") %> |

    <% if session[:edit_mode] == false %>
      <%= link_to 'Edit This Page', edit_genre_path %> 
    <% else %>
      <%= link_to 'Finish Editing', genre_path %> 
    <% end %>
  <% end %>

<table id="entry-table">

  <tr id="entry-table-row1">
    <td id="entry-top-pane">

      <span class="entry-title">
        <%=h @genre.name %>
      </span>

      <div id="top-tools">
        <% if @favorite.nil? %>
          <% if permitted_to? :create, :favorites %>
            <%= link_to 'Favorite', add_favorite_path(:id => @genre.id,
                                                      :type => 'Genre') %>
          <% end %>
        <% else %>
          <% if permitted_to? :destroy, :favorites %>
            <%= link_to 'Remove From Favorites', remove_favorite_path(:id => @favorite) %>
          <% end %>
        <% end %>
      </div><!-- /top-tools -->

    </td><!-- /entry-top-pane -->
  </tr><!-- /entry-table-row1 -->

  <tr id="entry-table-row2">
    <td class="entry-left-pane">
    
      <div id="entry-left-image">
        <img src="/images/REDUX.jpg" alt="Artist Image" width="200" height="200" />
      </div><!-- /entry-left-image -->

    </td><!-- /entry-left-pane -->

    <td class="entry-mid-pane">
      <table id="entry-mid-info">
        <tr>
          <td class="entry-info-label">Parent Genres:</td>
          <td>
            <% @genre.parents.each do |parent| -%>
              <%= link_to parent.name, parent %>
            <% end -%>
          </td>
        </tr>

        <tr>
          <td class="entry-info-label">Sub Genres:</td>
          <td>
            <% @genre.children.each do |child| -%>
              <%= link_to child.name, child %>
            <% end -%>
          </td>
        </tr>
      </table>
    </td><!-- /entry-mid-info -->
  </tr><!-- /entry-table-row2 -->

  <tr id="entry-table-row3">
    <td class="entry-left-pane">
      <div id="entry-left-menu">
        <ul class="tabnav">
          <%= genre_tab('History', 'info-pane', 'active') %>
          <%= genre_tab('Releases', 'discog-pane', 'inactive') %>
          <%= genre_tab('Discuss', 'forum-pane', 'inactive') %>
          <%= genre_tab('Reviews', 'review-pane', 'inactive') %>
        </ul>
      </div><!-- /entry-left-menu -->
    </td>

    <td class="entry-mid-pane">
      <div id="entry-mid-content">

        <div id="info-pane">
          <h2>History</h2>
          <%= simple_format(@genre.info) %>
          <br />
        </div><!-- /info-pane -->

        <div id="review-pane" style="display: none">
          <h2>Reviews</h2>
          <%= render :partial => 'reviews/review', :locals => {:item => @genre} %>
        </div><!-- /reviews -->

        <div id="discog-pane" style="display :none">
          <h2>Discography</h2>
          <% @genre.editions.each do |edition| -%>
            <% edition.release.artists.each do |artist| -%>
              <%= link_to artist.name, artist %>
              <%= (artist != edition.release.artists.last)? "&" : "" %>
            <% end -%>
            <%= link_to edition.title, :controller => :releases,
                                       :action => :show,
                                       :id => edition.release_id,
                                       :edition_id => edition.id %>
          <% end -%>
        </div><!-- /discog-pane -->


        <div id="forum-pane" style="display: none">
          <h2><%=h @genre.forum.title %></h2>
          <%= render :partial => "forums/forum", :locals => {:forum => @genre.forum } %>
        </div><!-- /forum-pane -->
      </div><!-- /entry-mid-content -->
    </td><!-- /entry-mid-pane -->
  </tr>
</table>